package mvc;

import lombok.extern.slf4j.Slf4j;
import org.apache.catalina.startup.Tomcat;

@Slf4j
public class SpringApplication {

	private static int PORT = 8080;

	public static void run() throws Exception {
		Tomcat tomcat = new Tomcat();
		tomcat.setPort(PORT);
		// 告诉tomcat  web项目
		tomcat.addWebapp("/", "D:\\");
		tomcat.start();
		log.info("startup tomcat success, port: {}", PORT);
		tomcat.getServer().await();
		//Thread.currentThread().join();
	}

}
